#ifndef UDPSAMPLE_H
#define UDPSAMPLE_H

#include <QObject>
#include <QUdpSocket>

class UdpSample : public QObject
{
    Q_OBJECT
public:
    explicit UdpSample(QObject *parent = nullptr);
    bool bind(quint16 port);
    qint64 writeDatagram(QString ip, quint16 port, QString msg);
private:
    QUdpSocket udpSocket;

signals:

public slots:
    void onReadyRead();
};

#endif // UDPSAMPLE_H
